package com.crm.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * layui的数要的数据格式
 * 把模块对象变成书对象
 * 我们之后需要一个类：module---》TreeNode
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeNode {
    private String title;//mname:模块名
    private Integer id;//mid:模块ID
    private List<TreeNode> children;//子节点
    private String href;//path：路径
    private Boolean spread;//节点是否展开，默认false
    private Boolean checked;//节点是否初始为选中状态，默认false

    public TreeNode(String title, Integer id, List<TreeNode> children, String href) {
        this.title = title;
        this.id = id;
        this.children = children;
        this.href = href;
    }
}
